import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    children: [
      {
        path: '/userManager.html',
        name: 'userManager',
        component: resolve => require(['@/views/components/userManager'], resolve),
      },
      {
        path: '/shopManager.html',
        name: 'shopManager',
        component: resolve => require(['@/views/components/shopManager'], resolve),
      },
      {
        path: '/orderManager.html',
        name: 'orderManager',
        component: resolve => require(['@/views/components/orderManager'], resolve),
      },{
        path: '/systemSet.html',
        name: 'systemSet',
        component: resolve => require(['@/views/components/systemSet'], resolve),
      },
    ]
  },
]

const router = new VueRouter({
  // mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
